/**
 * 
 */
package net.sisgac.despacho_mercaderia.model.dao.jpa;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

import net.sisgac.despacho_mercaderia.model.GuiaRemision;
import net.sisgac.despacho_mercaderia.model.dao.GuiaRemisionDAO;

/**
 * @author Luis Yarleque
 *
 */
@SuppressWarnings("unchecked")
public class JPAGuiaRemisionDAO implements GuiaRemisionDAO{

	private EntityManager em;
	
	public JPAGuiaRemisionDAO(EntityManager em){
		this.em=em;
	}

	

	@Override
	public int insertarGR(GuiaRemision guiaRemisionDTO) {

		try {
			em.persist(guiaRemisionDTO);
			
		} finally {
			
			return 1;
		}
	}

	
	@Override
	public int actualizarEst(GuiaRemision guiaReimisionDTO) {
		return 1;
	}
}
